package com.ticketbooking.service.impl;

import com.ticketbooking.service.IJdbcService;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by linzhi on 2017/8/23.
 */
@Service
@Transactional
public class JdbcService implements IJdbcService{
    @Resource
    private JdbcTemplate jdbcTemplate;

    public List query() {
        return jdbcTemplate.queryForList(" SELECT * FROM user ");
    }
}
